package com.zzr.zzrbackend.controller;

import com.zzr.zzrbackend.pojo.dto.CommonResult;
import com.zzr.zzrbackend.pojo.dto.param.*;
import com.zzr.zzrbackend.pojo.dto.result.*;
import com.zzr.zzrbackend.service.BEndService;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController

public class BEndController {
    @Resource
    private BEndService bEndService;

    @RequestMapping(value = "/api/disabuse-data/b", method = RequestMethod.GET)
    public CommonResult<DisabuseDataResult> getDisabuseList(HttpServletRequest request) {
        return bEndService.getDisabuseData(request);
    }

    @RequestMapping(value = "/api/childNumber/b", method = RequestMethod.GET)
    public CommonResult<ChildNumberResult> getChildNumber(HttpServletRequest request) {
        return bEndService.getChildNumber(request);
    }

    @RequestMapping(value = "/api/addTodoList/b", method = RequestMethod.POST)
    public CommonResult<NoData> addTodoList(@RequestBody AddTodoListParam addTodoListParam, HttpServletRequest request) {
        return bEndService.addTodoList(addTodoListParam, request);
    }

    @RequestMapping(value = "/api/getTodoList/b", method = RequestMethod.POST)
    public CommonResult<GetTodoListResult> getTodoList(@RequestBody GetTodoListParam getTodoListParam, HttpServletRequest request) {
        return bEndService.getTodoList(getTodoListParam, request);
    }

    @RequestMapping(value = "/api/disabuse-show/b", method = RequestMethod.GET)
    public CommonResult<ShowDisabuseListResult> showDisabuseList(HttpServletRequest request) {
        return bEndService.showDisabuseList(request);
    }

    @RequestMapping(value = "/api/personal-center-/b", method = RequestMethod.POST)
    public CommonResult<NoData> personalCenter(@RequestBody PersonalCenterParam personalCenterParam, HttpServletRequest request) {
        return bEndService.personalCenter(personalCenterParam, request);
    }

    @RequestMapping(value = "/api/modify-name-/b", method = RequestMethod.POST)
    public CommonResult<NoData> modifyName(@RequestBody ModifyNameParam modifyNameParam, HttpServletRequest request) {
        return bEndService.modifyName(modifyNameParam, request);
    }

    @RequestMapping(value = "/api/modify-phone-/b", method = RequestMethod.POST)
    public CommonResult<NoData> modifyPhone(@RequestBody ModifyPhoneParam modifyPhoneParam, HttpServletRequest request) {
        return bEndService.modifyPhone(modifyPhoneParam, request);
    }
}
